<template>
  <el-card class="mg-lg pd-lg">
    <el-table :data="tableData" border :header-cell-style="{
        background: '#EEF3FF',
        color: '#333333'
      }">
      <el-table-column align="center" type="index" label="序号" />
      <el-table-column align="center" prop="userName" label="用户名" />
      <el-table-column align="center" prop="name" label="姓名" />
      <el-table-column align="center" prop="phone" label="电话" />
      <el-table-column align="center" prop="creationTime" label="创建时间" />
    </el-table>
  </el-card>
</template>
<script>
import { ref } from "vue";
export default {
  setup() {
    // 请求接口
    onMounted(() => {
      const { proxy } = getCurrentInstance();
      proxy.$api.getWxLogin().then((res) => {
        console.log(res);
      });
    });
    const tableData = ref([
      {
        id: 0,
        userName: "wangxiaoli",
        name: "王小丽",
        phone: "17695786652",
        creationTime: "2022-11-22",
      },
      {
        id: 1,
        userName: "ludawei",
        name: "卢大伟",
        phone: "18695786652",
        creationTime: "2022-11-22",
      },
      {
        id: 1,
        userName: "luxiaowei",
        name: "卢小伟",
        phone: "17625786652",
        creationTime: "2022-11-23",
      },
    ]);
    return {
      tableData,
    };
  },
};
</script>
